home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / Technical.Notes / PDOS / TN.PDOS.004 < prev    next >
Encoding:
Text File  |  1988-12-15  |  1.7 KB  |  41 lines  |  [TEXT/pdos]

  1. Apple II
  2. Technical Notes
  3. _____________________________________________________________________________
  4.                                                   Developer Technical Support
  5.  
  6.  
  7. ProDOS 8
  8. #4:    I/O Redirection in DOS and ProDOS
  9.  
  10. Revised by:    Matt Deatherage                                  November 1988
  11. Revised by:    Pete McDonald                                    November 1985
  12.  
  13. This Technical Note discusses I/O redirection differences between DOS 3.3 and 
  14. ProDOS.
  15. _____________________________________________________________________________
  16.  
  17. Under DOS 3.3, all that is necessary to change the I/O hooks is installing 
  18. your I/O routine addresses in the character-out vector ($36-$37) and the key-
  19. in vector ($38-$39) and notifying DOS (JSR $3EA) to take your addresses and 
  20. swap in its intercept routine addresses.
  21.  
  22. Under ProDOS, there is no instruction installed at $3EA, so what do you do?
  23.  
  24. You simply leave the ProDOS BASIC command interpreter's intercept addresses 
  25. installed at $36-$39 and install your I/O addresses in the global page at 
  26. $BE30-$BE33.  The locations $BE30-$BE31 should contain the output address 
  27. (normally $FDF0, the Monitor COUT1 routine), while $BE32-$BE33 should contain 
  28. the input address (normally $FD1B, the Monitor KEYIN routine).
  29.  
  30. By keeping these vectors in a global page, a special routine for  moving the 
  31. vectors is no longer needed, thus, no $3EA instruction.  You install the 
  32. addresses at their destination yourself.
  33.  
  34. If you intend to switch between devices (i.e., the screen and the printer), 
  35. you should save the hooks you find in $BE30-$BE33 and restore them when you 
  36. are done.  Blindly replacing the values in the global page could easily leave 
  37. you no way to restore input or output to the previous device when you are 
  38. done.
  39.  
  40.  
  41.